<?php echo $this->Session->flash(); ?>
<div id="loading" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>
<?php echo $ajax->link($html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'requirements', 'action' => 'index', $requirement_id), array('update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'escape' => false)); ?>
<br>
<table id="tabla" class="tabla" >
    <thead>
        <tr>
            <th>ID </th>
            <th>TEXTO</th>
            <th>TIPO</th>
            <th colspan="2">OPCIONES</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($req as $rec): ?>
            <tr>
                <td><?php echo $rec['RequirementFault']['id'] ?></td>
                <td><?php echo $rec['RequirementFault']['nombre'] ?></td>
                <td><?php
        switch ($rec['RequirementFault']['tipo']) {
            case 1:
                echo "Cumple";
                break;
            case 2:
                echo "No cumple";
                break;
            case 3:
                echo "Subsanable";
                break;
            default:
                echo "";
                break;
        }
            ?></td>
                <td><?php echo $ajax->link('Editar', array('controller' => 'RequirementFaults', 'action' => 'edit', $rec['RequirementFault']['id']), array('update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'class' => 'actions')) ?></td>
                <td><?php echo $ajax->link('Borrar', array('controller' => 'RequirementFaults', 'action' => 'delete', $rec['RequirementFault']['id'], $requirement_id), array('update' => 'content', 'class' => 'actions'), '¿Desea eliminar el registro?') ?></td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<br>
<?php echo $ajax->link('ADICIONAR RESTRICCIÓN', array('controller' => 'RequirementFaults', 'action' => 'add', $requirement_id), array('update' => 'content', 'complete' => 'cargar()', 'class' => 'actions')) ?>
<br><br>
<?php echo $ajax->link($html->image('regresar.gif', array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar', 'title' => 'regresar')), array('controller' => 'requirements', 'action' => 'index', $call_id), array('update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'escape' => false)); ?>
